<div class="style-block" style="background: {{settings.bg_color6}};">
   {% if products.size == 0 %}
    <h2>Товары для сравнения не выбраны.</h2>
{% else %}
  <div id="compare_div">
    <table id="compare_table" >      
      <thead>
        <tr>
          <th rowspan="2" class="thead" style="padding-bottom: 15px; vertical-align: bottom; text-align: left;" >
            <a href="#" class="compare_show_similar">Показать одинаковые свойства</a>
            <a href="#" class="compare_hide_similar">Скрыть одинаковые свойства</a>
          </th>
          {% for product in products %}
          <th class="thead compare_{{product.id}}">
            <a href="#" rel="{{product.id}}" class="del_compare" processed="true">&times;</a><br />
            <a href="{{ product.url }}" class="compare_image" style="background: url({{ product.first_image.thumb_url }}) center center no-repeat #fff;"             ></a>    
          </th>
          {% endfor %}
        </tr>
        <tr class="dots">
          {% for product in products %}
          <th class="thead compare_{{product.id}}">
            <h3><a href="{{ product.url }}" class="decoration">{{ product.title }}</a></h3>
          </th>
          {% endfor %}
        </tr>
      </thead>
      <tfoot>
        <tr>
          <th class="tfoot">
            <a href="#" class="compare_show_similar">Показать одинаковые свойства</a>
            <a href="#" class="compare_hide_similar">Скрыть одинаковые свойства</a>
          </th>
          {% for product in products %}
          <th class="tfoot compare_{{product.id}}">
            <a href="#" rel="{{product.id}}" class="del_compare" processed="true"><img title="Удалить из сравнения" src="{{'btn_trash.gif'|asset_url}}" alt="" /></a>
            <div class="price-box">
              <h3 class="special-price">
                <span class="price">
                  {{product.sale_price | money}}
                </span>
              </h3>
            </div>
            <form action="{{ cart_url }}" method="post">
              <input type="hidden" name="variant_id" value="{{ product.variants.first.id }}" />
              {% if product.available %}
              {% if product.variants.size > 1 %}
              <input type="button" value="Купить" class="buy_button" onclick="document.location.href='{{product.url}}'" />
              {% else %}
              <input type="submit" class="buy_button buy" value="КУПИТЬ" />
              {% endif %}
              {% else %}
              <input type="submit" disabled="disabled" class="buy_button" value="КУПИТЬ" />
              {% endif %}
            </form>
          </th>
          {% endfor %}
        </tr>
      </tfoot>
      <tbody>
        {% for property in properties %}
        <tr class="{% unless property.differ? %}same{% endunless %} {% cycle 'alternation': '','even'%}">
          <th>{{ property.title }}</th>
          {% for product in products %}
          <td align="center" class="compare_{{product.id}}">
            {{ product.properties[property.handle].characteristics.first.title }}
          </td>
          {% endfor %}
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
  {% endif %}
</div>